package com.game.doudizhu.task;

import com.game.doudizhu.core.AITrainer;
import com.game.doudizhu.service.GameRoomService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class AITrainerStarterTask {
    private static final Logger logger = LoggerFactory.getLogger(AITrainerStarterTask.class);


    // 每1分钟执行一次清理
    @Scheduled(fixedRate = 60000)
    public void cleanupRooms() {
        logger.info("AI模型训练...");
        AITrainer.startTraining();
    }
}
